* {
  box-sizing: border-box;
}

html, body {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

@wechat: rgb(76, 190, 40);
@icon-suffix: -xxs -xs -sm -md -lg -xl -xxl;
@icon-size: 15px 18px 21px 24px 30px 36px 58px;
@icon-font-size: 10px 12px 14px 16px 24px 28px 36px;
.generate-icon-size(length(@icon-suffix));
.generate-icon-size(@n, @i: 1) when(@i <= @n) {
  @suffix: extract(@icon-suffix, @i);
  @size: extract(@icon-size, @i);
  @font-zie: extract(@icon-font-size, @i);
  .we-icon@{suffix} {
    display: inline-block;
    text-align: center;
    width: @size;
    height: @size;
    line-height: @size;
    font-size: @font-zie;
    vertical-align: middle;
  }
  .generate-icon-size(@n, (@i + 1));
}

@gaps: 5px 10px 15px 20px 25px 30px 35px 40px;
@gap-suffix: -xs -s -m -l -xl -xxl -xxxl -xxxl;
.generate-gap(length(@gaps));
.generate-gap(@n, @i: 1) when(@i <= @n) {
  @suffix: extract(@gap-suffix, @i);
  @gap: extract(@gaps, @i);
  .m@{suffix} {
    margin: @gap !important;
  }
  .mt@{suffix} {
    margin-top: @gap !important;
  }
  .mr@{suffix} {
    margin-right: @gap !important;
  }
  .mb@{suffix} {
    margin-bottom: @gap !important;
  }
  .ml@{suffix} {
    margin-left: @gap !important;
  }
  .p@{suffix} {
    padding: @gap !important;
  }
  .pt@{suffix} {
    padding-top: @gap !important;
  }
  .pr@{suffix} {
    padding-right: @gap !important;
  }
  .pb@{suffix} {
    padding-bottom: @gap !important;
  }
  .pl@{suffix} {
    padding-left: @gap !important;
  }
  .generate-gap(@n, (@i + 1))
}

#root {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
}

.app {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
}

.header {
  flex: 0 0 45px;
}

.body {
  display: flex;
  flex-grow: 1;
  flex-shrink: 2;
  flex-basis: auto;
  flex-direction: column;
  align-content: center;
}

.footer {
  display: flex;
  flex: 0 0 36px;
  line-height: 24px;
  padding: 6px 0;
  flex-direction: row;
  justify-content: center;
  a {
    padding: 0 12px;
    color: #666688;
  }
}

.head, .foot {
  flex: 0 0 auto;
}

.main {
  flex: 1 1;
}

.body-pane {
  position: relative;
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.back-icon {
  cursor: pointer;
  vertical-align: middle;
}

.v-middle {
  vertical-align: middle;
}

.am-tabs-default-bar-tab {
  height: 50px;
}

.app-tab-item {
  display: block;
  text-align: center;
  .icon {
    line-height: 1;
    text-align: center;
    .we-icon-lg {
      width: 24px;
      height: 24px;
      line-height: 24px;
    }
  }
  .text {
    text-align: center;
    line-height: 1;
    font-size: 12px;
    line-height: 12px;
  }
  .weicon + .am-badge-text {
    top: 0 !important;
  }
  .weicon + .am-badge-dot {
    top: 0 !important;
  }
}
.am-navbar-right {
  .we-icon-lg {
    cursor: pointer;
  }
}
.am-button-primary.wechat {
  background-color: @wechat !important;
}
.wechat-color {
  color: @wechat !important;
}
.wechat-bg {
  background-color: @wechat !important;
}
.am-navbar {
  background-color: #393a41;
}
.am-tabs-default-bar-tab {
  color: rgb(159, 159, 159);
}
.am-tabs-default-bar-tab-active {
  color: @wechat;
}
.am-tabs-default-bar-underline {
  display: none;
}

.am-list-item .am-list-line .am-list-content {
  font-size: 14px;
  line-height: 21px;
}
.am-list-item .am-list-line .am-list-brief {
  font-size: 12px;
  margin-top: 0;
}
.v-container .am-indexed-list-container {
  position: relative;
  height: 100%;
  overflow: hidden;
}
.v-container .am-list-view-scrollview {
  position: relative;
  height: 100%;
  overflow-y: auto;
}
.am-indexed-list-quick-search-bar {
  position: absolute;
}
.am-list-header {
  padding: 0;
}
.am-button-large.wechat {
  height: 40px;
  line-height: 40px;
}
.am-button-small.wechat {
  height: 28px;
  line-height: 28px;
  font-size: 12px;
  padding: 0 4px;
}
a {
  color: #8888bb;
}
.chat-list {
  .am-list-view-scrollview {
    background-color: #ececf3;
  }
  .am-list-body {
    background-color: transparent !important;
  }
}

html:not([data-scale]) .chat-list .am-list-body::after {
  display: none;
}
